package com.supermap.data.modal;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * 行政区划信息
 * TUser entity. @sun'f
 */
@Entity
@Table(name = "T_REGION")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class TRegion {

    /**
     * 主键
     */
    private String id;
    /**
     * 区划代码
     */
    private String region_code;
    /**
     * 区划名称
     */
    private String region_name;
    /**
     * 区划级别
     */
    private int region_level;
    /**
     * 上级区划代码
     */
    private String parcode;


    public TRegion() {
    }

    public TRegion(String id, String region_code, String region_name, int region_level, String parcode) {
        this.id = id;
        this.region_code = region_code;
        this.region_name = region_name;
        this.region_level = region_level;
        this.parcode = parcode;
    }

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Column(name = "REGION_CODE")
    public String getRegion_code() {
        return region_code;
    }

    public void setRegion_code(String region_code) {
        this.region_code = region_code;
    }

    @Column(name = "REGION_NAME")
    public String getRegion_name() {
        return region_name;
    }

    public void setRegion_name(String region_name) {
        this.region_name = region_name;
    }

    @Column(name = "REGION_LEVEL")
    public int getRegion_level() {
        return region_level;
    }

    public void setRegion_level(int region_level) {
        this.region_level = region_level;
    }

    @Column(name = "PARCODE")
    public String getParcode() {
        return parcode;
    }

    public void setParcode(String parcode) {
        this.parcode = parcode;
    }
}
